<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
<title>添加用戶</title>
<%@ include file="/WEB-INF/views/include/head.jsp"%>
<script type="text/javascript">
	$(document).ready(function() {
		$("#userForm").validate({
			submitHandler : function(form) {
				if ($("#password").val() != $("#password2").val()) {
					$("#mima").html("两次密码不一致！请重新输入");
					return false;
				} else {
					loading('正在提交，请稍等...');
					form.submit();
				}
			}
		});
	});
</script>
</head>
<body class="ContentBody">
	<form action="${ctx}/User/save" method="post" id="userForm">
		<tr>
			<td height="30">
				<table width="100%" border="0" cellspacing="0" cellpadding="0">
					<tr>
						<td height="62" background="${ctxStatic}/images/nav04.gif">
							<!--  -->
							<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
							</table>
						</td>
					</tr>
				</table>
			</td>
		</tr>
		<div class="MainDiv">
			<table width="99%" border="0" cellpadding="0" cellspacing="0" class="CContent">
				<tr>
					<th class="tablestyle_title">添加用戶页面</th>
				</tr>
				<tr>
					<td class="CPanel">
				<TR>
					<TD width="100%">
						<fieldset style="height: 100%;">
							<legend>添加用户</legend>
							<table border="0" cellpadding="2" cellspacing="1" style="width: 100%">
								<tr>
									<td nowrap align="right" width="13%">用户名:</td>
									<td width="41%"><input id="name" name="name" class="text required" type="text" /></td>
									<td align="right" width="19%">密码:</td>
									<td width="27%"><input name="password" id="password" class="text required" type="password" style="width: 154px" /></td>
								</tr>
								<tr>
									<td nowrap align="right"></td>
									<td></td>
									<td align="right">确认密码:</td>
									<td><input name="password2" id="password2" class="text required" type="password" style="width: 154px" /></td>
								</tr>
								<tr>
									<td colspan="4" align="center"><font color="red" id="mima"></font></td>
								</tr>
							</table>
							<br />
						</fieldset>
					</TD>
				</TR>
				</td>
				</tr>


				<TR>
					<TD colspan="2" align="center" height="50px"><input type="submit" name="Submit" value="保存" class="button" /> <input type="button"
						name="Submit2" value="返回" class="button" onclick="window.history.go(-1);" /></TD>
				</TR>
			</TABLE>
			</td>
			</tr>
			</table>
		</div>
	</form>
</body>
</html>
